﻿using DataChangeTools.Utils;
using Microsoft.Extensions.Logging;
using NLog;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DataChangeTools.WebApi.Common
{
    public class LoggingHelper
    {
        private static Logger logger = LogManager.GetCurrentClassLogger();

        public LoggingHelper()
        {
            string configPath = ConfigHelper.GetValue("config:NLogConfig");
            var config = new NLog.Config.XmlLoggingConfiguration(configPath);
            LogManager.Configuration = config;
        }

        public void Writelog(String message)
        {
            logger.Info(message);

        }

    }
}
